<form id="new_report_form">
<div class="editable" id="reportpreviewheader">

<div class="title floatWrapper">
<div id="reportGrayBar">
        <div class="reportWrapper" id="reportMetaHeader">
        
        <div id="report_reportID_container">
            <strong>Report ID:</strong>&nbsp;<span id="reportId"><?php echo $report['ReportId'];?></span>
            <input type="hidden" id="reportIdHidden" name="reportIdHidden" value="<?php echo $report['ReportId'];?>">
        </div>
        <input type="hidden" name="userId" value="<?php echo Yii::app()->user->id; ?>">
        <div id="report_toggle_view_container"><strong>Report Type:</strong>&nbsp;&nbsp;
        <select name="report_type" id="report_type" class="js_report_toggle">
        <option value="expense">Expense Report</option>
        <option value="Invoice">Invoice</option>
        <option value="Standard Report">Standard Report</option>
        </select>
        </div>
        <div id="report_toggle_view_container"><strong>From:</strong>&nbsp;&nbsp;<?php echo $report['FromEmail'];?> <input type="hidden" name="fromEmail" value="<?php echo $report['FromEmail'];?>"> </div>
        <div id="report_toggle_view_container"><strong>To:</strong>&nbsp;&nbsp;<input type="text" name="toEmail" value="<?php echo $report['ToEmail'];?>"></div>
        &nbsp;&nbsp;<div id="report_reportID_container"><strong>Date:</strong>&nbsp;&nbsp;<?php echo date('Y-m-d', strtotime($report['CreateAt']));?></div>
      </div>
            
        <div class="clearfix"></div>

    </div>
<div class="floatLeft width70" id="reportTitleContainer">
<div class="userDefinedFieldsSet" id="udfSet9">
<div class="userDefinedField title">
<div contenteditable="true" id="text_title"><?php echo $report['ReportName'];?></div>
</div>
</div>
</div>


</div>

<div class="fieldsContainer floatWrapper editable"
	id="report_invoice_dates_container">

<div class="width70" id="reportFieldsContainer">
<div class="userDefinedFieldsSet" id="udfSet8"></div>
</div>
</div>
</div>
<!-- close reportpreviewheader -->

<div class="tableview">
<div id="detailedview" style="display: none;"></div>


<div class=" editable" id="matrixview">
<h2>Report Item:</h2>
<table id="reporttable" class="reporttable display split-for-print">
	<thead>
		<tr>
			<td class="columnheader noborder delete-cell">&nbsp;</td>
			<td class="columnheader datecolumn">Date</td>
			
			<td class="columnheader receiptcolumn"></td>
			<td class="columnheader categorycolumn">Category</td>
			<td class="columnheader categorycolumn">Amount</td>
			<td class="columnheader currencycolumn">Exchange Rate</td>
			<td class="columnheader righttd amountcolumn">Total</td>
		</tr>
	</thead>
	<tbody>
	    <?php foreach ($reportDetails as $reportDetail):?>
		<tr id="reportRow_<?php echo $reportDetail['ExpenseId'];?>" class="hoverable odd last expense_item_tr">
			<td class="delete-cell remove"></td>
			<td class="editTransaction datecolumn lefttd"><?php echo date("Y-m-d",strtotime($reportDetail['Date']));?></td>
			<td width="10" class="receiptcolumn"><span class="addReceiptIcon">&nbsp;</span></td>
			<td class="editTransaction categorycolumn"><?php echo $reportDetail['Category'];?></td>
			<td class="editTransaction"><?php echo $reportDetail['Total'].'  ('.$reportDetail['Currency'].')';?></td>
			<td class="editTransaction currencycolumn righttd"><?php echo '1 '.$reportDetail['Currency'].' ='.number_format($reportDetail['ExchangeRate'], 2, '.', ',').' '.$defaultCurrency;?></td>
			<td class="editTransaction totalcolumn righttd cash"><?php echo number_format($reportDetail['Total']*$reportDetail['ExchangeRate'], 2, '.', ',');?></td>
		</tr>
		<?php endforeach;?>
		<tr class="total last">
			<td colspan="1" class="noborder"></td>
			<td colspan="5" class="noborder"><input type="hidden" name="totals" id="total_value" value="0"></td>
			<td colspan="1" class="totals righttd toptd" id="totals"><?php echo number_format($report['Total'], 2, '.', ',').' '.$defaultCurrency;?></td>
		</tr>

	</tbody>
</table>
<div class="button"><a id="report_add_expense">Add Expenses...</a></div>

</div>
<br/>
<div class="section" id="total_by_category">
</div>


<div style="display: none;" class="message_empty width70"
	id="managerReportEmptyTable">
<h3>No expenses are available to approve in this report.</h3>
<div>You should reject the report by clicking Reject on the top
left.</div>
</div>
</div>

<div class="floatWrapper marginTop reportMessages">
<div class="floatLeft message_error hidden qtip" id="reportViolations"
	style="display: none;">
<h3>Report Violations</h3>
</div>

<div class="clearfix"></div>
</div>



<div data-name="report_showSignature" id="reportSignatureContainer"
	class="reportOptionContainer qtip">
<div class="toggleoption printableHidden qtip"
	id="reportSignatureToggle">
<h2>Signatures</h2>
</div>
<div class="floatWrapper option" id="reportSignature">
<div class="signature">Submitted by: <span
	class="digitalSignatureSignature"> </span></div>
<div class="signature">Approved by: <span
	class="digitalSignatureSignature"> </span></div>
</div>
</div>


<div data-name="report_showHistory" class="reportOptionContainer"
	id="reportLog" style="display: none;">
<div class="toggleoption printableHidden qtip" id="reportHistoryToggle">
<h2>Report History</h2>
</div>
<div class="option message_neutral reportMemo" id="reportHistory">
<h3>Report History</h3>


</div>
</div>

<div data-name="report_showFullPageReceipts"
	class="reportOptionContainer floatRight" id="fullPageReceipts"
	style="display: block;">

<div class="option"></div>
</div>
<div class="pageBreakAfter">&nbsp;</div>
<div class="imageThumbContainer reportOptionContainer floatWrapper"
	id="receiptThumbContainer" style="display: block;">
<div class="toggleoption qtip" id="reportReceiptsToggle">
<h2>Receipt Thumbnails</h2>
</div>
<div class="option" id="thumbsoption">
<div class="receiptContainer">
<div class="receiptsContainer" id="attachedReceiptContainer">
<?php foreach ($receipts as $receipt):?>
	<div class="receipt_wrapper imagereceipt" id="receipt_<?php echo $receipt['ReceiptId'];?>">
	<div class="receipt OPEN"><span class="receiptID" ><span class="transactionID"></span><img class="receiptimage" id="receiptimg_<?php echo $receipt['ReceiptId'];?>"  src="<?php echo $receipt['Url'];?>"><a class="fancy" href="<?php echo $receipt['Url'];?>"></a></span></div>
	<ul class="expenseInfo pairs reported  current  ">
		<li>
		<p>Date:</p>
		<span><?php echo $receipt['CreateAt'];?></span></li>
		<li>
		<p>Currency:</p>
		<span><?php echo $receipt['Currency'];?></span></li>
		<li>
		<p>Total:</p>
		<span><?php echo $receipt['Total'];?></span></li>
		<li>
		<p>Category:</p>
		<span><?php echo $receipt['Category'];?></span></li>
	</ul>
	</div>
<?php endforeach;?>
</div>
</div>
</div>
</div>
<div class="watermark"></div>
</form>